/*
** TO CHECKOUT: svn checkout https://if-chat-g1.googlecode.com/svn/trunk/ if-chat-g1 --username
** TO COMMIT..: svn commit
** TO COMPILE.: gcc -Wall -g main.c -o if-chat `pkg-config --cflags gtk+-3.0` `pkg-config --libs gtk+-3.0`
** TO EXECUTE.: ./if-chat
*/

#include <arpa/inet.h>
#include <linux/types.h>
#include <errno.h>
#include <gtk/gtk.h>
#include <netinet/in.h>
#include <stdlib.h>
#include <string.h>
#include <sys/socket.h>
#include <unistd.h>

#define USERNAME_CAPACITY	64

#define ERROR					-1
#define PORT_STD				4040
#define TIMEOUT				10

char username[USERNAME_CAPACITY];
GSList *chats = NULL;
GSList *groups = NULL;
uint16_t port_usr = PORT_STD;

#include "english.h"
#include "message.h"
#include "chat.h"
#include "network.h"
#include "gui.h"

int main(int argc, char *argv[ ]) {
	if(argc > 2)
		port_usr = atoi(argv[1]);
	init_network_services( );
	gdk_threads_init( );
	create_gui(&argc, &argv);
	return EXIT_SUCCESS;
}
